WX.Net

About/News
Screenshots

Documentation
    Why WX.Net? 
    Roadmap
    Release Notes
    Building From Source
    Tutorial
    User Manual
    Reference Doc.
    WX.Build Doc.
    wxWidgets

Download

Who's Who
SourceForge

Get WX.Net at SourceForge.net. Fast, secure and Free Open Source software downloads

Built with wxWidgets

Works on Mono

?????????????????????????

Premake Details

If you are using the build system, you don't need to worry about Premake. But if you want to extend wx.NET or join the development team, a brief overview of Premake and it's use in wx.NET follows. Please make sure you have read the Premake Overview first. The Premake home page is at premake.sf.net.

Premake Configuration Files

Premake configuration files are written in the Lua scripting language, hence the .lua extension on each file. Under the top of the source tree you'll find the following:

premake.lua Builds the wx-c C++ wrapper library and the wx.NET.dll assembly
Src/wx-c/premake.lua
Src/wx-c/premake-funcs.lua
Builds the wx-c wrapper
Src/wx.NET/premake.lua Builds wx.NET.dll
Utils/premake.lua Builds all utilities
Utils/*/Src/premake.lua There are premake files for each utility
Samples/premake.lua Builds all samples
Samples/*/premake.lua There are premake files for each sample

Manual Use of Premake

If you need to edit the Premake configuration files or experiment with Premake, you'll probably want to make sure the premake binary is in your PATH. Using the pre-built premake binaries bundled with the wx.NET source is a safe option:

  • Build/Linux/premake
  • Build/MacOSX/premake
  • Build/Windows/premake.exe

On my Linux build system I've created a symlink in /usr/local/bin:

$ ln -s /usr/local/src/wx.NET-CVS/wx.NET/Build/Linux/premake \
  /usr/local/bin

Remember that this is not necessary to use the build system.

Premake has a number of options which control what type of build file(s) are created, what compiler to use, etc. In addition, Premake configuration files can accept their own custom options. This is used extensively by the wx.NET.dll and wx-c premake files. To see a list of both standard and custom options just type:

$ premake --help

The most important options are --target, which is used to specify the type of project build files to create:

 $ premake [ options ] --target xxx

The standard set of options for Premake 2.0 Beta 6 follow:

 --file name       Process the specified premake script file

 --clean           Remove all binaries and build scripts
 --verbose         Generate verbose makefiles (where applicable)

 --cc name         Choose a C/C++ compiler, if supported by target; one of:
      gcc     GNU gcc compiler
      dmc     Digital Mars C/C+ compiler

 --dotnet name     Choose a .NET compiler set, if supported by target; one of:
      ms      Microsoft (csc)
      mono    Mono (msc)
      pnet    Portable.NET (cscc)

 --target name     Generate input files for the specified toolset; one of:
      gnu     GNU Makefile for POSIX, MinGW, and Cygwin
      md      MonoDevelop (experimental)
      sd      ICSharpCode SharpDevelop
      vs6     Microsoft Visual Studio 6
      vs7     Microsoft Visual Studio 7
      vs2003  Microsoft Visual Studio 2003

 --help            Display this information
 --version         Display version information

Last changed on $Date: 2004/07/09 04:59:33 $ by $Author: t9mike $  •  Original Author: Michael S. Muegel