I just released irrBuild 1.0.0 @ sf.net :
https://sourceforge.net/projects/irrbuild/
The new build scripts can be downloadedhere.
SVN:
svn co https://irrbuild.svn.sourceforge.net/svnroot/irrbuild
( for now, trunk == tag 1.0.0)
irrBuild is a build system can generate native visual studio solutions, GNU Makefile and Code::Blocks workspace for irrlicht library and its examples and testcase. irrBuild uses Premake based build scripts. These scripts can also be used as build templates for various cross platform irrlicht applications (or any application, if you want ).
This release updated all the scripts to Premake4 and new Visual studio 2010 and 64bit configurations were also added.
Currently irrBuild works with:
* windows (32bit + 64bit):
* Visual studio 2003, 2005, 2008 and 2010 (Express Version OK)
* Code::Blocks 10.05 or 8.02 (MingW GCC 4.5.0)
* GNU/Linux (32bit + 64bit):
* GNU makefile
* Code::Blocks 10.05 or 8.02 (GCC 4.4.3)
And the default configurations are:
* release_static
* release_shared
* debug_static
* debug_shared
GNU/Linux build in action (CB + gmake + built binaries):
Windows build (vs2010 + vs2008 + CB):
Though not included in this release, CodeLite and MacOS support are also possible in my mind. Check Premake4 for platform details please.
Finally, the verbose readme
Code: Select all
This is the README file for irrBuild - The automatic build system for irrlicht
=========================================================
How to use irrBuild (Quick Introduction)
=========================================================
* First copy "build" folder to irrlicht's source tree as top level folder.
After that, the top directories of the source tree should look like this:
Root (: your irrlicht source tree)
|-bin/
|-build/ (<-- the new added build folder)
|-doc/
|-examples/
|-include/
|-lib/
|-media/
|-scripts/
|-source/
|-tests/
|-tools/
* [Windows: Microsoft Visual Studio]
To build irrlicht and its examples using Visual Studio 2003, 2005, 2008
and 2010, please execute (double-click) the corresponding bat file in
the above "build" folder:
* CreateVs2003Solution.bat (for Visual Studio 2003)
* CreateVs2005Solution.bat (for Visual Studio 2005)
* CreateVs2008Solution.bat (for Visual Studio 2008)
* CreateVs2010Solution.bat (for Visual Studio 2010)
, and load the generated solution to your IDE.
Note 1: The 2008 and 2010 Express versions can be used without any problems.
Note 2: The Direct3D SDK related include/library path are hard-coded in
"build_irrlicht.lua", if they are not specified within your IDE,
then probably you should change the definitions according to your
SDK setting (i.e., change DIRECTX_SDK_INC). Maybe later I will
add automatical search.
* [Linux/GNU: make]
To build irrlicht using makefile, first execute the following shell script:
* create_gcc_makefile.sh (for Linux/GNU make)
,and then do the necessary build for your configurations within the build
directory. For example:
$ ./create_gcc_makefile.sh
$ cd gmake
$ make help
$ make config=release_static32
$ make config=debug_shared32
* [Windows, Linux/GNU: Code::Blocks 10.05 and 8.02]
To build irrlicht and its examples using Code::Blocks, execute the
following shell/bat script:
* CreateCodeBlocksWorkspace.bat (for Windows)
* create_codeblocks_workspace.sh (for Linux/GNU)
and then load the generated workspace to your Code::Blocks IDE.
Note 3: The Windows builds (Visual Studio, Code::Blocks) will build
all the drivers (Direct3D, OpenGL, software ...) and all dependencies (zlib,
libpng, ...) by default.
Note 4: The Windows Code::Blocks uses MingW GCC 4.5.0 as back-end compiler.
Note 5: The Linux build for shared library works but current you must copy
the generated shared libraries manually to your library directory.
=========================================================
What will irrBuild build
=========================================================
irrBuild will build the following four configurations for irrlicht library
and its examples and testsuite, for both x86 (32-bit) and x64 (64-bit)
platforms.
* debug_shared (debug version shared library and examples)
* debug_static (debug version static library and examples)
* release_shared (release version shared library and examples)
* release_shared (release version static library and examples)
That is, actually we have eight configurations. Also please note we use
the same build target names for x86 and x64. Since usually we just pick
the desired platform and this should not be an issue here. If you really
want to build all the configurations for both of the two platforms, you
can change the target name by yourself.
=========================================================
Binary output and naming convention
=========================================================
irrBuild will never pollute irrlicht's source tree. That is, irrBuild will
*not* change any file and directory in irrlicht. So you can always use
irrlicht's original solution/Makefile/workspace if you want.
Of course, irrBuild do add several directories to hold the built libraries
and executables. However, different names used and they will not conflict
with the files built by irrlicht's original build system.
Suppose the root directory of irrlicht's source tree is Root, then by default
irrBuild will put libraries to
Root/lib/[target]/
,here [target] can be any of
* vs2003
* vs2005
* vs2008
* vs2010
* gmake
* codeblocks
, depends on your build target.
And the executables are generated to
Root/bin/[target]/
, and [target] is exactly the same as explained above.
So you see none of them conflicts with irrlicht's naming convention.
It is possible specify different output sub-directory for individual
configuration, but the examples use hard-coded path for necessary
media/resource, so the current method is better in my mind.
Also irrBuild uses following naming convention for individual built
files:
* debug build will add postfix "D" to the built binaries (lib, exe)
* debug build will add postfix "mt" to the static-link binaries (lib, exe)
For example, the debug DLL version of irrlicht library will be generated as:
irrlichtD.lib
irrlichtD.dll
and the release static-linked version of irrlicht library is built as:
irrlichtmt.lib
Note the postfix "mt" means "multithreaded", as irrBuild always uses
multithreaded DLL version runtime libraries.
=========================================================
Change the build option and internal information
=========================================================
1. Check premake @ sourceforge to get the details of premake.
Some predefined options are supported by premake.
( For example, disable exception, static version runtime library, etc. )
2. New configurations can be added by changing "premake4.lua".
3. The main differences between irrBuild based solutions and irrlicht's
solutions.
* Different naming convention used. Postfixes used to distinguish the
different configurations.
* For Visual Studio, DLL version of the runtime libraries are used in
irrBuild.
* Although premake supports "no-exceptions", but unfortunately irrlicht
does throw exceptions (for example, irrMap.h), which results in
compilation errors for MinGW gcc. Therefore "no-exceptions" was removed
currently. However, it is trivial to add this option for Visual Studio.
* For Visual Studio, "/fp:precise" is used for all the debug configurations,
However, all release configurations use "/fp:fast".
* "winmm.lib" is added for individual example and the core irrlicht library
will not link it.
* Higher warning level is set for all DEBUG configurations, and the
compilation is quite noisy, especially for Visual Studio.
* Global library link time optimization is turned off.
* Multiple cores/processors option /MP is added to all of the Visual
Sutdio configuration. This can be disabled by removing it from
the build scripts.
=========================================================
TODO list
=========================================================
1. Add "make install" for both Linux/GNU static and shared library builds.
=========================================================
end of README
=========================================================
Jiang