view build/openbsd4-config.py @ 697:ecaa4d98f05f tip

Abstracted the GUI code and refactored the GUIChan-specific code into its own module. * Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring. * GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass. * The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class. * The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged. * Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author M. George Hansen <technopolitica@gmail.com>
date Sat, 18 Jun 2011 00:28:40 -1000
parents be625cdff350
children
line wrap: on
line source

# Install the following packages: libvorbis python py-yaml swig png openal sdl
# sdl-image sdl-ttf guichan boost
#

import sys
import os

def initEnvironment(env):
	# Vorbisfile
	env.Append(CPPPATH = [
		os.path.join('/', 'usr', 'local', 'include'),
		os.path.join('/', 'usr', 'local', 'include', 'vorbis')
		])
	env.Append(LIBPATH = [os.path.join('/', 'usr', 'local', 'lib')])
	env.Append(LIBS = ['ogg', 'vorbis'])

	# PNG
	env.Append(CPPPATH = [os.path.join('/', 'usr', 'local', 'include', 'libpng')])

	# Python library
	pythonversion = 'python' + str(os.sys.version_info[0]) + '.' + str(os.sys.version_info[1])
	env.Append(CPPPATH = os.path.join('/', 'usr', 'local', 'include', pythonversion))
	env.Append(LIBS = [pythonversion, 'util'])

	# OpenBSD specific pthreads option
	env.Append(LINKFLAGS = ['-pthread'])

	return env

def addExtras(env, opengl):
	if opengl:
		env.Append(LIBS = ['stdc++', 'GL', 'GLU'])
		env.Append(LIBPATH = os.path.join('/', 'usr', 'X11R6', 'lib'))

	return env

def getRequiredHeaders(opengl):
	return None

def getRequiredLibs(opengl):
	libs = [
			('vorbisfile', 'vorbisfile.h'),
			('openal', 'AL/al.h'),
			('SDL', 'SDL.h'),
			('SDL_ttf', 'SDL_ttf.h'),
			('SDL_image', 'SDL_image.h'),
			('guichan', 'guichan.hpp'),
			('guichan_sdl', ''),
			('boost_system', ''),
			(('boost_filesystem', 'boost_filesystem-gcc', 'boost_filesystem-gcc41', 'boost_filesystem-mt'), 'boost/filesystem.hpp'),
			(('boost_regex', 'boost_regex-gcc', 'boost_regex-gcc41', 'boost_regex-mt'), 'boost/regex.hpp'),
			('png', 'png.h'),
			('Xcursor', 'X11/Xcursor/Xcursor.h')]

	if (opengl):
		libs.append(('guichan_opengl', ''))

	return libs

def getOptionalLibs(opengl):
	return None

# vim: ft=python: